serialPort = serial.Serial("/dev/ttyAMA0", 57600, timeout=0.5, rtscts=False, dsrdtr=False, xonxoff=True,bytesize=serial.EIGHTBITS,parity=serial.PARITY_NONE)
while True:
#one dataset is around 20000 bytes
item = serialPort.read(size=20000)
sys.stdout.write(item)
sys.stdout.flush()